From f1b6e44af115274f4524d7a94b9d6cb71b81c689 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Thu, 27 Dec 2018 11:38:34 -0700 Subject: [PATCH] fix up style file OFIELD option processing. --- xcsv.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xcsv.cc b/xcsv.cc index 6b3e140a1..b1ec2b06e 100644 --- a/xcsv.cc +++ b/xcsv.cc @@ -333,8 +333,10 @@ xcsv_parse_style_line(QString line) // This is pretty lazy way to parse write options. // They've very rarely used, so we'll go for simple. - if (tokens.size() > 4) { - QString options_string = tokens[3].simplified(); + // We may have split the optional fourth and final field which can contain + // option[s], so look at all the remaining tokens. + for (int token_idx = 3; token_idx < tokens.size(); ++token_idx) { + QString options_string = tokens[token_idx].simplified(); if (options_string.contains("no_delim_before")) { options |= OPTIONS_NODELIM; } -- 2.30.2